'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const {
    router,
    controller
  } = app;

  router.get('/', controller.home.index);
  router.get('/showJobByOid', controller.spider.showJobByOid);
  router.get('/job/getLocalPage', controller.spider.getLocalPage);
  router.get('/job/screen_shot', controller.spider.screenShot);
  router.post('/spider/get', controller.spider.index);
  router.post('/job/publish', controller.spider.publish);
  router.post('/job/batchIgnore', controller.spider.batchIgnore);
  router.post('/job/batchConfirm', controller.spider.batchConfirm);
  router.post('/job/save', controller.spider.save);
  router.post('/job/star', controller.spider.star);
  router.post('/job/create', controller.spider.create);
};